1. Field of the Invention
The present invention relates to a method for generating software, comprising at least two software components, from source files associated with the software components, the source files including variables initialized at zero and variables initialized at specific values, capable of being run on a terminal including an operating system without virtual memory and a physical memory, the physical memory including random access memory, capable of containing at least one data storage segment and at least one data segment, and read-only memory, capable of containing at least one data initialization segment, the method including, for each software component, at least one of which is capable of a specific restart when the software is run, the following steps:
a compilation step, using a compiler capable of allocating, for each source file, the variables initialized at zero to a data storage segment, the initialized variables to a data segment, and the specific values of the initialized variables to a data initialization segment, and of converting the source files into object files, and
a linkage editing step, using a linkage editor capable of grouping together the variables initialized at zero, the initialized variables, and their specific values in a respective block within their allocated respective segment, capable of assigning a predetermined zone of the memory for each block and capable of grouping together the object files to form an executable file corresponding to the software.
2. Description of the Related Art
The operating systems used in mobile terminals, for example such as mobile telephones, that include a physical memory are classified in two categories. The first category, corresponding to simple operating systems, is generally designated “RTOS” (Real Time Operating System), while the second category, corresponding to complete operating systems, is generally designated “complete OS.”
One difference between these two categories lies in the fact that the complete operating systems have a virtual memory, unlike the simple operating systems. This virtual memory makes it possible to isolate software components, used by a given application, and to initialize the memory used by the software components each time the application is (re)started.
Software including several software components is integrated into the terminal owing to the use of the physical memory of the terminal. Traditionally, the physical memory includes a random access memory (RAM), which can contain a data storage segment (BSS) and a data segment (data), and a read-only memory (ROM), which can contain at least one data initialization segment.
In particular, the integration includes a software generation phase, from source files, associated with the software components, comprising variables initialized at specific values and variables initialized at zero, the software being able to be run by the terminal. The variables initialized at specific values correspond to variables used by a developer of the concerned software component and the content of which has been set at a specific value during development. The variables initialized at zero correspond to variables whereof the content has not been set by the developer. For these variables, it is the operating system that sets their content at zero.
In a known manner, the generation phase uses a generation method including a compilation step of the software, capable of allocating, for each software component, the variables initialized at zero in the data storage segment and the variables initialized at specific values in the data segment. This compilation step is also capable of converting the source files into object files.
The generation method also includes a linkage editing step, able to group together the variables initialized at zero and those initialized at specific values within their respective allocated segment, and to group the object files together so as to form an executable file corresponding to the software.
After the method has been applied, the data storage segment includes all of the variables initialized at zero associated with each component grouped together and the data segment includes the set of variables initialized at specific values associated with each component grouped together.
Thus, for a given software component, the variables initialized at zero and those initialized at specific values respectively occupy part of the data storage segment and part of the data segment.
During operation of the terminal, the latter can run applications using one or more software components.
In the event an application is restarted, it is necessary to restart the software component(s) used by the application.
However, for simple operating systems, i.e. for operating systems without virtual memory, the restart is done by reinitializing the data storage segment and the data segment.
The problem is that this restart causes all of the software components in memory in the terminal to restart, causing the terminal to restart during a particular period, and therefore making the terminal completely unavailable during that entire period.